package com.company.笔试.构建乘积数组;

import java.util.ArrayList;
public class Solution {
    public int[] multiply(int[] A) {
        int len = A.length;
        int[] res = new int[len];
        int index = 0;
        for(int i=0 ;i<len;i++){
            res[index]=1;
            for(int j=0 ;j<len;j++){
                if(j!=index){
                    res[index]*=A[j];
                }
            }
            index++;
        }
        return res;
    }
}